﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ccit.ClassLibrary;

namespace Ccit.SysPlat.Organ
{
    /// <summary>
    /// Description: 系统平台组织机构 -> 机构管理接口
    /// Author: tim 2010-01-28
    /// </summary>
    public interface IOrgan
    {
        #region interface defination

        /// <summary>
        /// 获取机构信息
        /// </summary>
        /// <param name="organId">机构Id</param>
        /// <returns>机构消息对象</returns>
        MsOrgan GetOrganInfo(string organId);

        /// <summary>
        /// 保存机构信息 (新增/更新)
        /// </summary>
        /// <param name="msOrgan">机构信息消息对象</param>
        /// <returns>
        ///     【0】: 机构Id / error code
        ///     【1】: 提示消息
        /// </returns>
        List<string> Save(MsOrgan msOrgan);

        /// <summary>
        /// 根据机构Id获取机构名称
        /// </summary>
        /// <param name="organId"></param>
        /// <returns></returns>
        string GetOrganNameById(string organId);

        /// <summary>
        /// 根据机构Id串返回机构名称串
        /// </summary>
        /// <param name="organIds">逗号分隔的机构Id串</param>
        /// <param name="separator">返回的机构名称间的分隔符</param>
        /// <returns></returns>
        string GetOrganNamesByIds(string organIds, string separator);


        /// <summary>
        /// 根据机构Id串返回机构名称串
        /// (是否过滤掉无效的机构，返回有效的机构名称串)
        /// </summary>
        /// <param name="organIds">逗号分隔的机构Id串</param>
        /// <param name="separator">返回的机构名称间的分隔符</param>
        /// <param name="isFilter">是否过滤掉无效的机构</param>
        /// <returns></returns>
        string GetOrganNamesByIds(string organIds, string separator, eTrueFalse isFilter);
        #endregion
    }
}
